// ====================
// ---- 键盘快捷处理 ----
// ====================

//--------------------------------------
// 常用键盘键值表
// Esc:27; Tab:9; Caps:20; Shift:16; Ctrl:17; Alt:18; BackSpace:8; Space:32; Enter:13;// 
// F1~F12: 112-123; A~Z: 65-90;  0~9: 48-57; 0~9(小键盘):97-106
//
//--------------------------------------
document.onkeydown = keyDown;
function keyDown(e){
	if (document.all){
		var ieKey = event.keyCode;
		if (parent.location != self.location) {
			folderstr = "../";
		} else {
			folderstr = "";
		}
		if (event.ctrlKey && event.altKey && event.shiftKey) { 
			//-------------------------------
			// Ctrl + Alt + Shift ＋ otherKey
			// 此处设置Ctrl,Alt,Shift三个键一起按下后的快捷处理。
			//-------------------------------
			switch (ieKey) {
			}
			//-------------------------------
		} else if (event.ctrlKey && event.altKey) {
			//-------------------------------
			// Ctrl + Alt ＋ otherKey
			// 此处设置Ctrl,Alt两个键一起按下后的快捷处理。
			//-------------------------------
			switch (ieKey) {
			}
			//-------------------------------
		} else if (event.ctrlKey) {  
			//-------------------------------
			// Ctrl + otherKey
			// 此处设置Ctrl键加其它键的快捷处理。
			//-------------------------------
			switch (ieKey) {
				case 112:  // F1
					parent.mFrame.location.href = folderstr + "public/list.htm";
					break;
				case 113:  // F2
					parent.mFrame.location.href = folderstr + "public/insert.htm";
					break;
				case 114:  // F3
					parent.mFrame.location.href = folderstr + "public/detail.htm";
					break;
				case 115: // F4
					parent.mFrame.location.href = folderstr + "public/tablelist.htm";
					break;
				default:
					break;		
			}
			//-------------------------------
		} else if (event.altKey) {  
			//-------------------------------
			// Alt + otherKey
			// 此处设置Alt键加其它键的快捷处理。
			//-------------------------------
			switch (ieKey) {
				case 65:  // A
					parent.mFrame.location.href = folderstr + "public/list.htm";
					break;
				case 66:  // B
					parent.mFrame.location.href = folderstr + "public/insert.htm";
					break;
				case 67:  // C
					parent.mFrame.location.href = folderstr + "public/detail.htm";
					break;
				case 68: // D
					parent.mFrame.location.href = folderstr + "public/tablelist.htm";
					break;
				default:
					break;		
			}
			//-------------------------------
		} else if (event.shiftKey)	{  
			//-------------------------------
			// Shift + otherKey
			// 此处设置Shift键加其它键的快捷处理。
			//-------------------------------
			switch (ieKey) {
			}
			//-------------------------------
		} else {
			//-------------------------------
			// 此处设置按单个键的快捷处理。
			//-------------------------------
			switch (ieKey) {
			}
			//-------------------------------
		}
	}
}

function DivOnMouseOver(obj) {
	if(obj.innerText != "" && obj.innerText != "-")
	{
		var cs = obj.currentStyle.cursor;
		obj.className = "DivOver";
		obj.style.cursor = cs;
	}
}
function DivOnMouseOut(obj) {
	obj.className = "DivOut";
}